feat: drop query_alerts and switch query_incidents to free-text query#52
Merged
Conversation
The query_alerts tool nudged LLMs into iterating over individual alert events instead of working with incidents (the actual primary entity in Flashduty). Remove it; QueryAlertEvents is preserved for drilling into a single alert by ID, which still has clear value during incident investigation. For query_incidents, replace the title param with query, which maps to /incident/list's `query` field. Backend behavior: - Doris full-text search across title/labels/content - 24-char hex string -> resolved as incident_id - 6-char string -> resolved as incident num The previous title param was exact-match by default and surfaced almost nothing for fuzzy keywords coming out of an LLM. query is the same field the web UI search bar uses. go.mod replace pins to the SDK fork commit while flashcatcloud/flashduty-sdk#5 is in review; swap to a real version once that PR merges.
The previous commit pinned via a replace pointing at the ysyneu fork because the SDK PR was open cross-fork. The SDK branch is now also on flashcatcloud/flashduty-sdk, so we can pin straight to the upstream commit pseudo-version and drop the replace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
query_alerts— it pushed LLMs into iterating over individual alert events instead of working with incidents (the actual top-level entity).query_alert_eventsis kept for drilling into a single alert by ID during investigation.query_incidentsfromtitle→query— maps to the backend/incident/listqueryfield, which:incident_idlookupnumlookuptitleparam defaulted to exact match and rarely surfaced anything from a fuzzy LLM-generated keyword.The Alerts toolset shrinks from 2 → 1 tools (
query_alert_events).Dependencies
Requires flashcatcloud/flashduty-sdk#5 (adds
QuerytoListIncidentsInput). Thereplacedirective ingo.modpins to the SDK fork commit while that PR is in review — swap to a real version once it merges.Test plan
go build ./...cleango test ./...passesreplacedirective after SDK PR merges